

from pydantic import BaseSettings

class StudentSettings(BaseSettings):
    """学生模块配置类"""
    # 从环境变量获取配置，方便在Docker中覆盖
    db_host: str = "host.docker.internal"
    db_port: int = 3306
    db_user: str = "root"
    db_password: str = "123456"
    db_name: str = "student_db"
    port: int = 8002
    host: str = "0.0.0.0"

    # 启用从.env文件加载配置
    class Config:
        env_file = ".env"
